package util.PluginTools;


import com.supermap.desktop.core.Interface.IBaseItem;
import com.supermap.desktop.core.implement.CtrlAction;
import util.Info;

/**
 * 点击开始ribbon中的 GetName开关，开启状态下，鼠标移动到控件输出name
 * 将配置文件SuperMap.Desktop.JUnitPlugin.config放到WorkEnvironment中加载此插件
 */
public class GetNameSwitch extends CtrlAction {
	public static boolean GET_NAME = false;

	public GetNameSwitch(IBaseItem caller) {
		super(caller);
	}

	@Override
	public void run() {
		GET_NAME = !GET_NAME;
		if (GET_NAME) {
			Info.out("==================GetName plugin started. ====================");
			Info.out("=============Component name will be shown on mouse over.====== ");
			new GetNameThead().start();
		} else {
			Info.out("==================GetName plugin stopped. ====================");
		}
	}
}
